package org.tao.lightningmq.common.dto;

import io.netty.channel.ChannelHandlerContext;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @Author lht
 * @date 2025/1/16 - 22:06
 * @description:
 */
public class SlaveAckDTO {

    private AtomicInteger needAckNum;
    private ChannelHandlerContext brokerChannel;

    public SlaveAckDTO() {
    }

    public SlaveAckDTO(AtomicInteger needAckNum, ChannelHandlerContext brokerChannel) {
        this.needAckNum = needAckNum;
        this.brokerChannel = brokerChannel;
    }

    public AtomicInteger getNeedAckNum() {
        return needAckNum;
    }

    public void setNeedAckNum(AtomicInteger needAckNum) {
        this.needAckNum = needAckNum;
    }

    public ChannelHandlerContext getBrokerChannel() {
        return brokerChannel;
    }

    public void setBrokerChannel(ChannelHandlerContext brokerChannel) {
        this.brokerChannel = brokerChannel;
    }

    @Override
    public String toString() {
        return "SlaveAckDTO{" +
                "needAckNum=" + needAckNum +
                ", brokerChannel=" + brokerChannel +
                '}';
    }
}
